<html>
<head>
<title>Video</title>
<script language="javascript">
if (window.name != "LeftupFrame") location = "content.htm";
</script>
<script language="javascript" src="frmleftdown.js"></script>
<script language="javascript" src="config.js"></script>
</head>

<script language="javascript">
var 	mpStopped=1, mpPaused=2, mpPlaying=3,
	mpScanForward=4, mpScanReverse=5, mpEnded=8,
        NeverUpdatePosition=1,TimerID=0,
        Waiting=0,WaitingCount=0,
        AsxFileName;
</script>

<script language="javascript" FOR="window" EVENT="onload">
//Load ASF File
if(document.location.protocol == "file:") 
  AsxFileName = "localclip.asx";
else 
  AsxFileName = "remoteclip.asx";
AsxFileName=GetDocumentPath()+AsxFileName;
MediaPlayer.URL = AsxFileName;
</script>

<script language="javascript">
function Syn()
{
  TimerID = setTimeout("Syn()",1000);

  if (Math.abs(parent.RightFrame.VGAPlayer.CurrentPosition - MediaPlayer.Controls.currentPosition * 1000) >= 300) 
  {
    parent.RightFrame.VGAPlayer.CurrentPosition = MediaPlayer.Controls.currentPosition * 1000;
  }

  if ( (MediaPlayer.playState == mpPlaying) && (parent.RightFrame.VGAPlayer.Status == 1) )
  {
    parent.RightFrame.VGAPlayer.Play(); 
  }
}
</script>

<script language="javascript" FOR="MediaPlayer" EVENT="Buffering(Start)">
if (Start)
{
  parent.RightFrame.VGAPlayer.Pause();
}
else
{
  parent.RightFrame.VGAPlayer.Play();
}
</script>

<script language="javascript" FOR="MediaPlayer" EVENT="playStateChange(NewState)">
switch(NewState) 
{
  case mpPlaying: 
	parent.RightFrame.document.all.VGAPlayer.Play();
        if (TimerID == 0) Syn();
	break;
  case mpPaused:
	parent.RightFrame.document.all.VGAPlayer.Pause();
	break;
  case mpStopped:
	parent.RightFrame.document.all.VGAPlayer.Stop();
	break;
  case mpEnded:
	parent.RightFrame.document.all.VGAPlayer.Stop();
}
</script>

<script language="javascript" FOR="MediaPlayer" EVENT="PositionChange(dblOldPosition, dblNewPosition)">
  parent.RightFrame.VGAPlayer.CurrentPosition = dblNewPosition * 1000;
  parent.RightFrame.VGAPlayer.Play();
</script>

<body bgcolor="black">

<script language="javascript">
  document.writeln("<object align=right classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 id=MediaPlayer width='100%' height='100%'>"); 
  document.writeln("  <param name='windowlessVideo' value='0'>");
  document.writeln("  <param name='stretchToFit' value='-1'>");
  document.writeln("</object>");
</script>

</body>
</html>
